<div class="modal fade bs-modal-lg" id="modelContent">
	<div class="modal-dialog modal-lg">
        <div class="modal-content"></div>
    </div>
</div> 

<div class="portlet box green">
    <div class="portlet-title">
		<div class="caption"><i class="fa fa-cogs"></i>订单管理 &gt; 售后管理 &gt; 取消订单服务</div>
		<div class="tools"><a href="javascript:;" class="collapse" data-original-title="" title=""> </a></div>
    </div>
    <div style="background-color: rgb(249, 247, 161);">
		<label >
		注：1.系统买家可在付款后买家发货前一段时间内，申请取消订单；取消订单申请成功后，买家支付的订单金额、运费等全部按支付来源退还。<br/>
       2.审核中状态为买家申请取消订单后需要通知卖家审核；待退款为买家审核通过等待平台退款；已退款为平台已给买家退款。</label>
	</div>
    <div class="portlet-body">
		<div class="portlet-body form">
		   	<form action="/order/list" class="form-horizontal" method="get" id="searchForm" onsubmit="return false">
				<div class="form-body">
					<div class="row">
						<div class="col-md-3">
							<label class="col-md-4 control-label">单号：</label>
							<div class="col-md-8">
						    	<input type="text" class="form-control" name="id" value="$!searchModel.id">
						    	<input type="hidden" name="orderState" value="$!searchModel.orderState" />
							</div>
						</div>
						<div class="col-md-3">
							<label class="col-md-4 control-label">申请会员：</label>
							<div class="col-md-8">
						    	<input type="text" class="form-control" name="username" value="$!searchModel.username">
							</div>
						</div>
						
						<div class="col-md-4">
							<label class="col-md-3 control-label">下单时间：</label>
							<div class="col-md-4">
						    	<input type="text" class="form-control" readOnly id="startTime" name="startTime" value="$!startTime">
						    	<i class="fa fa-calendar" style="position: absolute;right: 10px;top: 10px"></i>
							</div>
							<div class="col-md-1">~</div>
							<div class="col-md-4">
						    	<input type="text" class="form-control"readOnly id="endTime" name="endTime" value="$!endTime">
						    	<i class="fa fa-calendar" style="position: absolute;right: 10px;top: 10px"></i>
							</div>
						</div>
		    		</div>
		    		<div class="row">
		    		&nbsp;<br/>
		    		</div>
		    		<div class="row">
						<div class="col-md-3">
							<label class="col-md-4 control-label">收货人：</label>
							<div class="col-md-8">
						    	<input type="text" class="form-control" name="receiver" value="$!searchModel.receiver">
							</div>
						</div>
						
						<div class="col-md-2">
							<div class="actions col-md-12">
								<a href="javascript:;" class="btn green btn-sm ajax-search"><i class="fa fa-search"></i> 查询 </a>
								<a href="javascript:;" class="btn green btn-sm search-reset"><i class="fa fa-eraser"></i> 清除 </a>
							</div>
						</div>
		    		</div>
				</div>
				
			</form>
		</div>
		
    	<div class="dataTables_wrapper no-footer">
			<div class="table-scrollable">
			    <table class="table table-striped table-bordered table-hover">
				  	<thead>
						<tr>
		   		 			<th>售后单号</th>
		   		 			<th>订单号</th>
		   		 			<th>申请会员</th>
		   		 			<th>售后类型</th>
		   		 			<th>售后状态</th>
		   		 			<th>申请时间</th>
		   		 			<th>所属企业</th>
		   		 			<th>详情</th>
							<th class="col-md-2">操作</th>
						</tr>
					</thead>
					<tbody>
					#foreach($item in $pageOrder.result)
		  				<tr>
						    <td>
							    <a class="btn btn-outline btn-sm ajaxify" href="/cancelOrder/detail?id=$!item.id"> 
							    	$!item.id
							    </a>
						    </td>
						    <td>$!item.orderId</td>
						    <td>$!item.username</td>
						    <td>$!item.reOrderType.name</td>
						    <td>$!item.orderState.name</td>
						    <td>$!item.createDate</td>
						    <td>$!item.company</td>
						    <td>
					    	 	<a class="btn green btn-outline btn-sm ajaxify" href="/cancelOrder/detail?id=$!item.id"> 
							    	<i class="fa fa-eye"></i>详情
							    </a>
						    </td>
			    			<td>
						    	#if($!item.orderState == 'WAIT_AUDIT')
						    	<a class="btn green btn-outline btn-sm ajax-operation" thref="/cancelOrder/pass?id=$!item.id" tohref="/cancelOrder/list"> 
									<i class="fa fa-check"></i>通过
								</a>
								#end
								#if($!item.orderState == 'TREASURER_AUDIT')
						    	<a class="btn green btn-outline btn-sm ajax-model-get" href="#modelContent" thref="/cancelOrder/reFundPass?id=$!item.id" data-toggle="modal"> 
									<i class="fa fa-check"></i>通过并退款
								</a>
								#end
						    </td>		  			
		  				</tr>
					#end
					</tbody>
				</table>
			</div>
			#set($page=$pageOrder)
			#set($pageUrl="/order/list?orderState=$!searchModel.orderState&pageNo=")
			#parse("_page.htm")
		</div>
    </div>
</div>
<script src="/assets/scripts/views-date.js" type="text/javascript"></script>
<script type="text/javascript">

ComponentsSelect2.initWithSearch()
MyTouchSpin.init()

</script>
<script type="text/javascript">
$("input[name= id]").focus();
</script>
